<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- <script src="./node_modules/axios/dist/axios.js"></script> -->
    <script src="./axios/index.js"></script>
    <script>
        // axios({
        //     method: 'get',
        //     url: '/user',
        //     params: {
        //         id: 111,
        //         o: 'ooo'
        //     },
        //     baseUrl: 'http://localhost:3000'
        // }).then(data => {
        //     console.log(data);
        // })
        // axios.baseUrl = 'http://localhost:3000';
        // axios.post('http://localhost:3000/user', {
        //     id: '1234'
        // }).then(data => {
        //     console.log(data);
        // })

        let a = axios.create({
            baseURL: 'http://localhost:3000',
            
            params: {
                id: 123111
            } 
        })
        a({
            method: 'get',
            url: "/user",
        }).then(data => {
            console.log(data);
        })

    </script>
</body>

</html>